<?php defined('LFNC_VERSION') or die('forbidden');


/**
* MLT Web Engine
* http://www.molotsoft.ru
*
* @package MLT_WE
* @subpackage Lucky_Funcs
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: function.lfnc.php 110 2009-01-19 12:50:01Z molotsoft@gmail.com $
* @link $HeadURL: http://lucky-funcs.googlecode.com/svn/branches/version_1/funcs/function.lfnc.php $
*/


function call_user_count_func_array($count, $function, $param_arr) {
	$result = array();
	for ($i = 0; $i < $count; $i ++) $result[] = call_user_func_array($function, $param_arr);
	return $result;
}

function loop_array($count, $function, $param_arr) {
	return call_user_count_func_array($count, $function, $param_arr);
}

function call_user_count_func($count, $function /* [, parameter [, ...]] */ ) {
	$args = func_get_args();
	return call_user_count_func_array($count, $function, array_shifted($args, 2));
}

function loop($count, $function /* [, parameter [, ...]] */ ) {
	$args = func_get_args();
	return loop_array($count, $function, array_shifted($args, 2));
}


?>